from ast import List


class Solution:
    def isStraight(self, nums: List[int]) -> bool:
        zero_cnt = 0
        diff = 0
        nums = sorted(nums)
        for index, num in enumerate(nums):
            if num == 0:
                zero_cnt+=1
            else:
                if index+1<len(nums) and nums[index]==nums[index+1]:
                    return False
                if index+1<len(nums) and nums[index]+1!=nums[index+1]:
                    diff += nums[index+1]-nums[index]-1;
        return zero_cnt>=diff
